<?php
 /*******************************************************************************
 * @filename: add.ctp
 *
 * @author: immer_baldos
 *
 * @description: products/add view
 *
 * @history:
 *
 *   VERSION   DATE                   BY          NOTES
 *  ---------------------------------------------------------------
 *     1.0     September  9, 2009     immer       initial bake
 *
 *     2.0     September 16, 2009     immer       add role based menus
 *
 ******************************************************************************/
 ?>
 <div class="products form">
<?php echo $form->create('Product');?>
	<fieldset>
 		<legend><?php __('Add Product');?></legend>
	<?php
		echo $form->input('name');
		echo $form->input('description');
		echo $form->input('instock');
		echo $form->hidden('sold',array('value'=>'0'));
		echo $form->input('price');
	?>
	</fieldset>
<?php echo $form->end('Submit');?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('List Products', true), array('action' => 'index'));?></li>
		<li><?php
		    if ($_SESSION['Auth']['User']['role'] == "admin" ){
		        echo $html->link(__('List Transactions', true), array('controller' => 'transactions', 'action' => 'index'));
		    }
		    ?> </li>
		<li><?php
		    if ($_SESSION['Auth']['User']['role'] == "admin" ){
		        echo $html->link(__('New Transaction', true), array('controller' => 'transactions', 'action' => 'add'));
		    }
		    ?> </li>
	</ul>
</div>
